<template>
	<view>
		<view class="goods flex flex-ai-center pa-16 bg-color-white">
			<w-image :src='order.goods_cover_image' radius="8" :height="98/2" :width="98/2"></w-image>
			<view class="flex-1 pl-16 ptb-4 flex flex-dir-col flex-js-center">
				<view class="flex flex-ai-center font-color-main-text font-w-500">
					<text class=" ">{{handleLang(order.goods_name)}}</text>
					<view class=""
						v-if="order.goods_type!=1&&order.collection_code&&order.collection_code.length==1 && order.order_type!=10">
						<!-- <text class="font-size-10">{{handleLang('编号：')}}</text> -->
						<text class="">#</text>
						<text class="">{{code[0]}}</text>
						<!-- <text class="">/{{code[1]}}</text> -->
					</view>
				</view>
				<!-- <view class="font-color-999" v-else>
					<text class="font-size-10">{{handleLang('数量：x')}}</text>
					<text>{{order.num||1}}</text>
				</view> -->
			</view>
			<!-- <w-icon name="arrow-right" :size="24"></w-icon> -->
		</view>
		<view class="bg-color-white br-12 pa-16 mt-8">
			<view class="flex flex-ai-center flex-js-sb">
				<view style="color: #686868;" class="font-size-14">购买数量</view>
				<view style="color: #1B1B1B;" class="font-w-600">{{order.num||1}}</view>
			</view>
			<view class="flex flex-ai-center flex-js-sb mt-20">
				<view style="color: #686868;" class="font-size-14">实付金额</view>
				<view style="color: #1B1B1B;" class="font-w-600">￥{{['8',8].includes(order.order_type)? order.price:order.total_price}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			order: {
				type: Object,
				default () {
					return {
						product: {}
					}
				}
			}
		},
		computed: {
			code() {
				if (this.order.collection_code && this.order.collection_code.length == 1) {
					return this.order.collection_code[0].split('/')
				}
			},
		}
	}
</script>

<style>
</style>